package com.naizhuai.ui.entity.mainbusiness;

import com.naizhuai.Model.db.user.PersonUserBean;
import com.naizhuai.ui.entity.management.DepartmentBean;

import java.io.Serializable;
import java.util.List;

/**
 * 目标详情页面的targetBean
 * Created by code_han on 2018/4/11.
 */

public class TargetDetailsBean implements Serializable {

    public static final String GOAL_ID_KEY = "goal_id_key";

    private String goalId;

    private String pointTarget;

    private String title;
    //立项原因
    private List<String> detail;
    //参与人（如果参与人与部门都为空，则表示都参加）
    private List<PersonBean> joinedUserLimit;
    //参与部门（如果参与人与部门都为空，则表示都参加）
    private List<DepartmentBean> joinedDepartmentList;
    //模拟预算
    private String budget;
    //负责人相关信息
    private PersonBean managerUserInfo;
    private String startTime;
    private String endTime;

    private TargetDetails countArray;
    //用户权限类
    private UserPower userControl;

    //目标中任务详情
    private List<TaskBeanForDetails> taskList;

    public TargetDetailsBean() {
    }

    public String getPointTarget() {
        return pointTarget;
    }

    public void setPointTarget(String pointTarget) {
        this.pointTarget = pointTarget;
    }

    public List<PersonBean> getJoinedUserLimit() {
        return joinedUserLimit;
    }

    public void setJoinedUserLimit(List<PersonBean> joinedUserLimit) {
        this.joinedUserLimit = joinedUserLimit;
    }

    public List<DepartmentBean> getJoinedDepartmentList() {
        return joinedDepartmentList;
    }

    public void setJoinedDepartmentList(List<DepartmentBean> joinedDepartmentList) {
        this.joinedDepartmentList = joinedDepartmentList;
    }

    public String getGoalId() {
        return goalId;
    }

    public void setGoalId(String goalId) {
        this.goalId = goalId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public List<String> getDetail() {
        return detail;
    }

    public void setDetail(List<String> detail) {
        this.detail = detail;
    }

    public List<DepartmentBean> getJointDepartments() {
        return joinedDepartmentList;
    }

    public void setJointDepartments(List<DepartmentBean> joinedDepartmentList) {
        this.joinedDepartmentList = joinedDepartmentList;
    }

    public String getBudget() {
        return budget;
    }

    public void setBudget(String budget) {
        this.budget = budget;
    }

    public PersonBean getManagerUserInfo() {
        return managerUserInfo;
    }

    public void setManagerUserInfo(PersonBean managerUserInfo) {
        this.managerUserInfo = managerUserInfo;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public TargetDetails getCountArray() {
        return countArray;
    }

    public void setCountArray(TargetDetails countArray) {
        this.countArray = countArray;
    }

    public UserPower getUserControl() {
        return userControl;
    }

    public void setUserControl(UserPower userControl) {
        this.userControl = userControl;
    }

    public List<TaskBeanForDetails> getTaskList() {
        return taskList;
    }

    public void setTaskList(List<TaskBeanForDetails> taskList) {
        this.taskList = taskList;
    }

    public void initRefreshData(TargetDetailsBean detailsBean) {
        setGoalId(detailsBean.getGoalId());
        setTitle(detailsBean.getTitle());
        setDetail(detailsBean.getDetail());
        setJointDepartments(detailsBean.getJointDepartments());
        setBudget(detailsBean.getBudget());
        setManagerUserInfo(detailsBean.getManagerUserInfo());
        setStartTime(detailsBean.getStartTime());
        setEndTime(detailsBean.getEndTime());
        setCountArray(detailsBean.getCountArray());
        setUserControl(detailsBean.getUserControl());
        setTaskList(detailsBean.getTaskList());
    }

    public static class PersonBean implements Serializable {
        private String uid;
        private String username;
        private String thumb;

        public PersonBean() {
        }

        public PersonBean(String username) {
            this.username = username;
        }

        public String getUid() {
            return uid;
        }

        public void setUid(String uid) {
            this.uid = uid;
        }

        public String getUsername() {
            return username;
        }

        public void setUsername(String username) {
            this.username = username;
        }

        public String getThumb() {
            return thumb;
        }

        public void setThumb(String thumb) {
            this.thumb = thumb;
        }

        @Override
        public String toString() {
            return uid;
        }
    }

    public static class DepartmentBean implements Serializable {
        private String departmentId;
        private String departmentName;

        public DepartmentBean() {
        }

        public String getDepartmentId() {
            return departmentId;
        }

        public void setDepartmentId(String departmentId) {
            this.departmentId = departmentId;
        }

        public String getDepartmentName() {
            return departmentName;
        }

        public void setDepartmentName(String departmentName) {
            this.departmentName = departmentName;
        }

        @Override
        public String toString() {
            return departmentId;
        }
    }

    public static class TargetDetails implements Serializable {
        private String taskCount;
        private String orginizePersonCount;
        private String joinedPersonCount;
        private String vBudget;
        private String effectAmount;
        private String vTotalBudget;

        public TargetDetails() {
        }

        public String getTaskCount() {
            return taskCount;
        }

        public void setTaskCount(String taskCount) {
            this.taskCount = taskCount;
        }

        public String getOrginizePersonCount() {
            return orginizePersonCount;
        }

        public void setOrginizePersonCount(String orginizePersonCount) {
            this.orginizePersonCount = orginizePersonCount;
        }

        public String getJoinedPersonCount() {
            return joinedPersonCount;
        }

        public void setJoinedPersonCount(String joinedPersonCount) {
            this.joinedPersonCount = joinedPersonCount;
        }

        public String getvBudget() {
            return vBudget;
        }

        public void setvBudget(String vBudget) {
            this.vBudget = vBudget;
        }

        public String getEffectAmount() {
            return effectAmount;
        }

        public void setEffectAmount(String effectAmount) {
            this.effectAmount = effectAmount;
        }

        public String getvTotalBudget() {
            return vTotalBudget;
        }

        public void setvTotalBudget(String vTotalBudget) {
            this.vTotalBudget = vTotalBudget;
        }
    }

    public static class UserPower implements Serializable {
        public static final String HAS_POWER = "1";
        public static final String HAS_NO_POWER = "0";
        //是否有添加的权限
        private String addTask;
        //是否有复盘的权限
        private String checkTask;

        public UserPower() {
        }

        public String getAddTask() {
            return addTask;
        }

        public void setAddTask(String addTask) {
            this.addTask = addTask;
        }

        public String getCheckTask() {
            return checkTask;
        }

        public void setCheckTask(String checkTask) {
            this.checkTask = checkTask;
        }
    }

    public static class TaskBeanForDetails implements Serializable {
        private String taskId;
        private String taskTitle;
        private String managerThumb;
        private String managerName;
        //组织人数
        private String organizeCount;
        //参与人数
        private String joinedCount;
        //任务预算
        private String taskBudget;
        //效果金额
        private String effectMoney;
        //行为产生总量
        private String actionTotalNumber;
        //行为完成量
        private String actionFinishedNumber;
        //开始时间
        private String startTime;
        //结束时间
        private String endTime;

        public TaskBeanForDetails() {
        }

        public String getTaskId() {
            return taskId;
        }

        public void setTaskId(String taskId) {
            this.taskId = taskId;
        }

        public String getTaskTitle() {
            return taskTitle;
        }

        public void setTaskTitle(String taskTitle) {
            this.taskTitle = taskTitle;
        }

        public String getManagerThumb() {
            return managerThumb;
        }

        public void setManagerThumb(String managerThumb) {
            this.managerThumb = managerThumb;
        }

        public String getManagerName() {
            return managerName;
        }

        public void setManagerName(String managerName) {
            this.managerName = managerName;
        }

        public String getOrganizeCount() {
            return organizeCount;
        }

        public void setOrganizeCount(String organizeCount) {
            this.organizeCount = organizeCount;
        }

        public String getJoinedCount() {
            return joinedCount;
        }

        public void setJoinedCount(String joinedCount) {
            this.joinedCount = joinedCount;
        }

        public String getTaskBudget() {
            return taskBudget;
        }

        public void setTaskBudget(String taskBudget) {
            this.taskBudget = taskBudget;
        }

        public String getEffectMoney() {
            return effectMoney;
        }

        public void setEffectMoney(String effectMoney) {
            this.effectMoney = effectMoney;
        }

        public String getActionTotalNumber() {
            return actionTotalNumber;
        }

        public void setActionTotalNumber(String actionTotalNumber) {
            this.actionTotalNumber = actionTotalNumber;
        }

        public String getActionFinishedNumber() {
            return actionFinishedNumber;
        }

        public void setActionFinishedNumber(String actionFinishedNumber) {
            this.actionFinishedNumber = actionFinishedNumber;
        }

        public String getStartTime() {
            return startTime;
        }

        public void setStartTime(String startTime) {
            this.startTime = startTime;
        }

        public String getEndTime() {
            return endTime;
        }

        public void setEndTime(String endTime) {
            this.endTime = endTime;
        }

        @Override
        public String toString() {
            return "taskId="+taskId+";taskTitle="+taskTitle+";managerName="+managerName+";joinedCount="+joinedCount;
        }
    }
}
